The present invention relates to data processing systems and to the processes of installing, updating and running interpreted programming language applications on data processing systems. In particular, the present invention provides a method, program and system for installing and updating applications written in an interpreted programming language by using a web start application and while running in a designated virtual machine.
A virtual machine, such as the JAVA Virtual Machine (JVM) is a virtual computer component that resides in memory on a computer. For an application to be executed on different types of data processing systems, a compiler typically generates an architecture-neutral file format so that the compiled code is executable on any processor, so long as the JVM is accessible by the processor. The architecture-neutral file format consists of bytecode instructions that are generated by a JAVA compiler and are non-specific to a given computer architecture. A bytecode is a machine independent code generated by the JAVA compiler and executed by a JAVA interpreter. A JAVA interpreter, part of the JVM, alternately decodes and interprets an intermediary code called “bytecode”. These bytecode instructions are designed to be easily interpreted on any platform and easily translated into native machine code.
Programs written in an interpreted programming language may be executed by such a programming virtual machine. Theoretically, any programming language may be interpreted; however the term “interpreted programming language” traditionally designates languages that are implemented through execution by an interpreter. The term “interpreted programming language” also designates languages for which no compilers are written.
In many interpreted languages, a basic interpreter translates basic code into native machine code. In an interpreted language such as JAVA, rather than generating native machine code, a compiler generates bytecodes to be used by the programming virtual machine. The JAVA virtual machine then translates the bytecodes into native machine code. JAVA, has an intermediate bytecode stage, because it is faster to translate bytecodes into native machine code than translating JAVA code, and bytecodes are machine/architecture independent, e.g. you can take bytecodes generated on one type of machine (UNIX) and bring them to totally different hardware, where the virtual machine will interpret them for use. These bytecodes provide the control and data necessary to execute an application. Subsequently, to actually execute an interpreted programming language application, an interpreter interprets the compiled bytecodes generated by the compiler.
JAVA is a well-known interpreted programming language and it is used herein as a preferred example. However, it should be well understood to those skilled in the art that other interpreted programming languages, such as RUM BASIC, SmallTalk, PYTHON, PERL and the like are within the scope of this invention.
JAVA is a software programming language, originally developed by Sun Microsystems, that is designed to generate applications that can run on all hardware platforms without modification. Because of this, JAVA applications have found extensive use on the World Wide Web (WWW). JAVA applications can be called from within hypertext markup language (HTML) documents or launched stand alone.
As is known to those skilled in the art, a WWW server may include facilities for storing and transmitting application programs, such as application programs written in JAVA, for execution on a client computer.
JAVA Web Start (JWS) provides a mechanism to run JAVA applications without installing anything on the client computer except a virtual machine and JWS. Generally, JWS simply downloads the JAVA application jar files from the server whenever the JAVA application is launched on the client computer. This takes advantage of the JAVA code's machine-independence to easily update the JAVA application when it is launched the next time on the client computer.
However, the virtual machine used by a web start application and subsequently by the main application is currently chosen in a manner that does not always optimize memory resources. Again, using the specific example of JAVA Web Start, JWS uses one JVM to run JAVA Web Start and the same JVM to run the main JAVA application, whether or not there are other JVMs available for use. This slows the running of both JWS and the main JAVA application on the one JVM. This is due to JAVA Web Start adding between 10-15 MB of memory overhead to every application started through Web Start because many swing classes and GUI classes that are in the jar file are loaded automatically by JWS onto the JVM, whether or not the classes are needed.
Additional overhead is added to the running of the main application because JWS does not guarantee the JVM version that the main application will run under. For example, if there are multiple JVMs installed on the same client computer, JWS can fork off any one of the JVMs depending on how they are registered in the system registry. This causes problems when the main application needs to be run inside a certain JVM—because of JVM version requirements, specific libraries installed to the particular JVM, etc. Moreover, as the various classes in the jar file are downloaded, JWS downloads them into its own web start cache location, obfuscating the filenames in the process so it is difficult to find the files that should be copied to a desired JVM. The term “web start cache” refers to a location on a client computer where the web start application stores copies of particular files in order to more easily access the files rather than having to request the files each time from the server. In some instances this cache may also be located at an intermediary location nearer to the client than to the server.
It would be desirable therefore to provide a mechanism to install and update applications written in interpreted programming languages so that they are installed using a designated virtual machine, particularly a local virtual machine which is not the same machine as that being used by the web start application.
It would be desirable to provide a mechanism to install and update applications written in interpreted programming languages so that only desired classes, of a desired virtual machine version, are loaded on the designated virtual machine.
The present invention provides a method and system for installing and updating applications written in interpreted programming languages from the server in order to overcome the objections described above.